home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3148 / text0000.txt < prev   
Encoding:
Text File  |  1996-08-05  |  1.8 KB  |  41 lines

  1. In a message of 07 Feb 96, IAN wrote to :
  2.  
  3.  IJE> ExecBase being absolute:  It has to be!  The application MUST know
  4.  IJE> exactly where Exec is at.  The OpenLibrary function is in Exec, so
  5.  IJE> if Exec was an openable library with a variable base address, this
  6.  IJE> would be a paradox.
  7.  
  8. Would it? The system startup code should be able to handle this, IMHO, even
  9. without a fixed address..
  10.  
  11.  IJE> If the ExecBase was obtained in a different way, how?  If it moved
  12.  IJE> around, how could you find it?  It is virtually impossible to not
  13.  IJE> have at least one absolute address in a system.  The only way to
  14.  IJE> circumvent it would be to pass the ExecBase pointer in a register
  15.  IJE> to the program when it first starts... but that wouldn't be too
  16.  IJE> platform independent either.
  17.  
  18. But what startup code is platform independent? You need some dependent
  19. parts, and startup falls into this category.
  20.  
  21. Besides, fixed register or fixed memory location, what difference is there?
  22. Same dependancy, only a different way to find the information. And here I
  23. must say I'd prefer a fixed register (mostly because the address 4 on the
  24. Amiga isn't in the fastest address range).
  25.  
  26. Side note: I'e written a library (that makes rather heavy use of system
  27. resources), that _never_ references address 4. There is no need to do it.
  28. For (most) programs, one access should be enough.
  29.  
  30.  IJE> There is NO way to run a program that accesses any OS function without
  31.  IJE> relying on either: fixed addresses, fixed register(s), or fixed
  32.  IJE> interrupts. (like the Mac; 0xA000 line interrupts call system
  33.  IJE> functions.)
  34.  
  35. True (but the Mac (and some old CP/M implementations) isn't one I like. I
  36. mean, there is a certain amount of overhead in exception processing ;).
  37.  
  38. --
  39. Magnus Holmgren - Amiga programmer and enthusiast
  40.  
  41.